wayland_device->pointer_grab_window = window;
wayland_device->pointer_grab_time = time_;
+
+ /* FIXME: This probably breaks if you end up with multiple grabs on the
+ * same window - but we need to know the input device for when we are
+ * asked to map a popup window so that the grab can be managed by the
+ * compositor.
+ */
+ _gdk_wayland_window_set_device_grabbed (window,
+ wayland_device->device,
+ time_);
}
return GDK_GRAB_SUCCESS;
gdk_device_core_ungrab (GdkDevice *device,
guint32 time_)
{
+ GdkWaylandDevice *wayland_device = GDK_DEVICE_CORE (device)->device;
GdkDisplay *display;
GdkDeviceGrabInfo *grab;
if (grab)
grab->serial_end = grab->serial_start;
+
+ _gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
+ NULL,
+ 0);
}
}
void _gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
GdkDisplay *display);
+void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
+ struct wl_input_device *input_device,
+ guint32 time_);
+
#endif /* __GDK_PRIVATE_WAYLAND_H__ */
GdkGeometry geometry_hints;
GdkWindowHints geometry_mask;
+
+ struct wl_input_device *grab_input_device;
+ guint32 grab_time;
};
struct _GdkWindowImplWaylandClass
impl_class->change_property = gdk_wayland_window_change_property;
impl_class->delete_property = gdk_wayland_window_delete_property;
}
+
+
+void
+_gdk_wayland_window_set_device_grabbed (GdkWindow *window,
+ struct wl_input_device *input_device,
+ guint32 time_)
+{
+ GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+
+ impl->grab_input_device = input_device;
+ impl->grab_time = time_;
+}